<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css动画</title>
    <style>
        div{
            width: 300px;
            height: 10px;
            background-color: royalblue;
            transition: width ease-in 5s 1s;
        }
        div:hover{
            width: 0;
        }
    </style>
</head>
<body>
<div>
</div>
</body>
</html>